﻿@using WY.RMS.ViewModel.Member
@model IEnumerable<ModuleVM>
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel (optional) -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="@Url.Content("~/Scripts/AdminLTE2.3.0/dist/img/yige.jpg")" style="width:45px;height:45px;" class="img-circle" alt="User Image">
                >
            </div>
            <div class="pull-left info">
                <p>管理员</p>
                <!-- Status -->
                <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
            </div>
        </div>
        <!-- search form (Optional) -->
        <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search...">
                <span class="input-group-btn">
                    <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button>
                </span>
            </div>
        </form>
        <!-- /.search form -->
        <!-- Sidebar Menu -->
        <ul class="sidebar-menu">
            <li class="active"><a href="/Common/Home/Index"><i class="fa fa-home"></i> <span>主页</span></a></li>
            @*<li class="header">菜单</li>*@
            <!-- Optionally, you can add icons to the links -->
            @*<li class="active"><a href="#"><i class="fa fa-link"></i> <span>Link</span></a></li>
                <li><a href="#"><i class="fa fa-link"></i> <span>Another Link</span></a></li>
                <li class="treeview">
                    <a href="#"><i class="fa fa-windows"></i> <span>Multilevel</span> <i class="fa fa-angle-left pull-right"></i></a>
                    <ul class="treeview-menu">
                        <li><a href="#">Link in level 2</a></li>
                        <li><a href="#">Link in level 2</a></li>
                    </ul>
                </li>*@
            @foreach (var item in Model)
            {
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-windows"></i> <span>@item.Name</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    @*@if (item.ChildModules.Count > 0)
                        {*@
                    <ul class="treeview-menu">
                        @{
                //IList<Module> orderChild = item.ChildModules.OrderBy(c => c.Code).ToList();
                foreach (var child in item.ChildModules)
                {
                    <li><a href="@Url.Content(@child.LinkUrl)">@child.Name</a></li>
                }
                        }
                        @*<li><a href="#">Link in level 2</a></li>
                            <li><a href="#">Link in level 2</a></li>*@
                    </ul>
                    @*}*@
                </li>

            }
        </ul><!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>
